function cmdHideSurface(id)
{
+ if (grab.window == id)
+ doUngrab();
+
var surface = surfaces[id];
if (!surface.visible)
function cmdDeleteSurface(id)
{
+ if (grab.window == id)
+ doUngrab();
+
var surface = surfaces[id];
var i = stackingOrder.indexOf(surface);
if (i >= 0)
function cmdUngrabPointer()
{
sendInput ("u", []);
-
- grab.window = null;
+ if (grab.window)
+ doUngrab();
}
function handleCommands(cmdObj)
sendInput ("B", [realWindowWithMouse, id, pos.rootX, pos.rootY, pos.winX, pos.winY, lastState, button]);
if (grab.window != null && grab.implicit)
- doUngrab(ev.timeStamp);
+ doUngrab();
}
/* Some of the keyboard handling code is from noVNC and